MCQ Answer

Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?

Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?

मान लीजिए कि d = {"जॉन": 40, "पीटर": 45}, "जॉन" के लिए एंट्री डिलीट करने के लिए,हम किस कमांड का यूज़ करते हैं?
Topic : Sequence data types in python

A. d.delete(“john”:40) d.delete ( "जॉन": 40)

B. d.delete(“john”) d.delete ( "जॉन")

C. del d[“john”] डेल डी ["जॉन"]

D. del d(“john”:40) डेल डी ("जॉन": 40)




Correct Answer is :

C. del d[“john”]



Explanation
Execute in the shell to verify.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad